public class homework1 {


    public static void main(String[] args) {

        int[] arr = {1, 2, 1};

        if (checkOneTime(arr)) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }

    }

    static Boolean checkOneTime(int[] arr) {

        Boolean[] mem = new Boolean[1000];

        for (int i : arr) {
            if (mem[i] != null) {
                return false;
            } else {
                mem[i] = true;
            }
        }

        return true;
    }


}
